{template header}
{template detail_common}
<div class="wrapper">
	<div class="sitepath">
    	<a href="/">首页</a> > 
        {loop $sitepath $k $c}
        <a href="/?mod=post&act=list&catid=$c[catid]">$c[cname]</a> >
        {/loop}
        $post[title]
    </div>
    <div class="active-detail-title">$post[title] 
    {if $post[postdata][active][start]}
    <span class="activetime">(报名时间:{$post[postdata][active][start]}--{$post[postdata][active][end]})</span>
    {/if}
    </div>
    <div class="active-detail-content">$post[content]</div>
    <div class="active-detail-bar">
    	 <span style="float:right;">
         {if !$G[islogin]}
         <a href="/?mod=member&act=login&continue=$G[BASEURL]" class="action-join-button">马上登录参加</a>
         {elseif $activestate==1}
         <a href="javascript:;" class="action-join-button">活动尚未开始</a>
         {elseif $activestate==2}
         <a href="javascript:;" class="action-join-button">活动已结束</a>
         {else}
         <a href="javascript:;" class="action-join-button" onclick="joinActive($post[id])">马上报名参加</a>
         {/if}
        </span>
    	 <a href="javascript:;" onclick="Favorite($post[id])"><span class="icon">&#xf0144;</span>加入收藏</a>
        {if $allowdelpost}<a href="javascript:;" onclick="deletePost($post[id])">删除</a>{/if}
        {if $alloweditpost}<a href="/?mod=post&act=editpost&id=$post[id]">编辑</a>{/if}
        {if $allowauditpost}
        <a href="javascript:;" onclick="setPostState($post[id],0)">通过审核</a> 
        <a href="javascript:;" onclick="setPostState($post[id],2)">取消审核</a>
        {/if}
    </div>
    <div class="blank"></div>
    <div class="goods-detail-content" id="goods-detail-content">
    	<div class="tabs">
        	<span class="cur">活动评论</span>
        </div>
        {if $post[allowcomment]}
        {if $allowcomment}
        <div class="post-comment-form">
            <form method="post" name="formcomment">
            <textarea class="comment-textarea" name="message" id="comment-text" placeholder="在这里输入评论内容"{if !$G[islogin]} disabled{/if}></textarea>
            <div class="comment-toolbar"><input type="button" class="comment-publish" id="comment-publish" value="发布"><span>已有<font node="comments">$post[comments]</font>条评论</span></div>
            </form>
            {if !$G[islogin]}<div class="errortips" style="display:block;"><i class="icon">&#xf0142;</i>登录后才能发评论哦，亲.</div>{/if}
            <div class="errortips" id="comment-tips"><i class="icon">&#xf0142;</i>不能发空评论哦，亲.</div>
        </div>
        {/if}
        <h3 class="post-comment-title">最新评论</h3>
        <div class="comment-loading" id="comment-loading"><img src="/static/images/common/loading16.gif"> 正在加载评论...</div>
        <div id="post-comment-list-content"></div>
        {else}
        <div style="padding:30px; font-size:16px; color:#666; text-align:center;">沙发空缺中。。。</div>
        {/if}
    </div>
</div>
<script type="text/javascript">
(function(){
var tabs = $("#goods-detail-content>.tabs").find("span");
var contents = $("#goods-detail-content").find(".content-item");
tabs.click(function(){
	$(this).addClass('cur').siblings().removeClass('cur');
	contents.eq($(this).index()).show().siblings('.content-item').hide();
});
})();
</script>
<script type="text/javascript" src="/static/js/postdetail.js"></script>
{template footer}